

def func(num):
    if num < 5:
        return num
    elif num == 5:
        return 0
    else:
        return sum([ int(i) for i in str(2*num)])
def main():
    power = 1000
    dic = {2:1}
    count = 0
    for i in range(1000):
        dicnew = {}
        for j in range(10):
            count += j * dic[j]
        
main()
